package demo.db.mysql.vo;

public enum EventType {

    PRE_GA_WRITE_ROWS("PRE_GA_WRITE_ROWS"), WRITE_ROWS("WRITE_ROWS"), EXT_WRITE_ROWS("EXT_WRITE_ROWS"),
    PRE_GA_UPDATE_ROWS("PRE_GA_UPDATE_ROWS"), UPDATE_ROWS("UPDATE_ROWS"), EXT_UPDATE_ROWS("EXT_UPDATE_ROWS"),
    PRE_GA_DELETE_ROWS("PRE_GA_DELETE_ROWS"), DELETE_ROWS("DELETE_ROWS"), EXT_DELETE_ROWS("EXT_DELETE_ROWS");

    private String type;

    private EventType(String type) {
        this.setType(type);
    }

    public static EventType getEventType(String eventType) {
        for (EventType type : EventType.values()) {
            if (type.getType().equals(eventType)) {
                return type;
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
